package controller

import (
	"github.com/gin-gonic/gin"
	"gofly/ws"
)

func SendMessage(c *gin.Context) {
	roomId := c.PostForm("room_id")
	msg := c.PostForm("msg")
	ws.Room.SendMessageToRoom(roomId, msg)
	c.JSON(200, gin.H{
		"code": 200,
		"msg":  "ok",
	})
}
